package com.czk.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.czk.common.to.mq.OrderTo;
import com.czk.common.utils.PageUtils;
import com.czk.gulimall.ware.entity.WareSkuEntity;
import com.czk.gulimall.ware.vo.LockStockResult;
import com.czk.gulimall.ware.vo.SkuHasStockVo;
import com.czk.gulimall.ware.vo.WareSkuLocVo;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author chenzhangkun
 * @email 1052031630@qq.com
 * @date 2021-12-07 23:04:24
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void addStock(Long skuId, Long wareId, Integer skuNum);

    List<SkuHasStockVo> getSkuHasStock(List<Long> skuIds);

    Boolean orderLockStock(WareSkuLocVo vo);


    void unlockStock(OrderTo orderTo);
}

